PokeBankFloat
PokeBankFloat BankNumber, AddressOffset, FloatValue#
 
Parameters:

    BankNumber = The Index Identifier of the bank that you wish to poke
    AddressOffset = The Address where you want to write this data to within the bank
    FloatValue# = The Value you wish to store in this memory bank at the above address offset
Returns: NONE
 

     PokeBankFloat allows you to poke (store) a 32bit Float value into a memory bank.



FACTS:


      * 32bit floats are single precision.
      * 32bit floats are 4 bytes wide.




Mini Tutorial:


      This simple example creates a bank, pokes some Float values into it then displays them again.

  
  
  
; Create Memory Bank #1 and make it 1000 bytes in size
  CreateBank 1,1000
  
  
; ================================================
; Store some 32bit Floating Point values into the bank
; ================================================
; Poke the Floating Point value 123.456 into memory bank 1 at
; address offset 500
  
  PokeBankFloat 1500123.456
  
; Poke next Floating POint value 33.33 at 504. So it doesn't overwrite
; the previous poke.
  
  PokeBankFloat 150433.33
  
  
; Read And Display the previously poke value again.
  Print "Your Float Value:"+Str$(PeekBankFloat(1,500))
  
; Read And Display the previously poke value again.
  Print "Your Float Value:"+Str$(PeekBankFloat(1,504))
  
  
; Display the Screen And Wait For the user To press a key
  Sync
  WaitKey
  
  



This example would output.

  
  Your Float Value: 123.456
  Your Float Value: 33.33
  

 
Related Info: CreateBank | Dim | Float | NewBank | PeekBankFloat | PeekBankInt | PeekBankString | PeekBankWord | Pointer | PokeBankByte | PokeBankInt | PokeBankString | PokeBankWord :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com